package com.wyh.service.gfive;

import com.wyh.common.result.Result;
import com.wyh.domain.dto.gfive.RoleAddDTO;
import com.wyh.domain.dto.gfive.RoleUpdateDTO;
import com.wyh.domain.po.gfive.PageHelper;
import com.wyh.domain.po.gfive.Role;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wyh.domain.po.gfive.RoleStatusUpdateRequest;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
* @author KmJHHhhhR
* @description 针对表【role(角色表)】的数据库操作Service
* @createDate 2024-05-20 15:03:04
*/
public interface RoleService extends IService<Role> {
    Result <Map<String,Object>>selectRole(String name, Integer state, PageHelper pageHelper);

    Result updateRoleState(RoleStatusUpdateRequest request);

    Result updateRole(RoleUpdateDTO roleUpdateDTO);
    @Transactional
    Result addRoleWithPermissions(RoleAddDTO roleAddDTO);


    Result findRolePermission(int roleId);

    List<Role> selectRoleByUserId(Integer id);

    List<Role> showAllRole();

    List<String> selectRolesByIds(Integer[] roleIds);


}
